<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title th:text="新增订单"></title>
	<script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
	<style type="text/css">
		table.gridtable {
		    font-family: verdana,arial,sans-serif;
		    font-size:11px;
		    color:#333333;
		    border-width: 1px;
		    border-color: #666666;
		    border-collapse: collapse;
		    width:700px;
		}
		table.gridtable th {
		    border-width: 1px;
		    padding: 20px;
		    border-style: solid;
		    border-color: #666666;
		    background-color: #dedede;
		}
		table.gridtable td {
		    border-width: 1px;
		    padding: 15px;
		    border-style: solid;
		    border-color: #666666;
		    background-color: #ffffff;
		}
	</style>
</head>

<body>
	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 微信号管理</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">

		<!-- Table -->
		<div class="panel panel-flat min-panel">
			<div class="panel-heading">
				<h5 class="panel-title text-primary"><i class="icon-twitter" th:text="新增订单"/></h5>
        	</div>
			<form action="#" id="edit">
						<div class="modal-body">
							<div class="form-group">
								<label th:text="'财务单号'"></label><span class="text-danger">*</span>
								<input name="financeOrderNo" type="text" placeholder="财务单号" class="form-control"  required="true"/>
							</div>
						
							<div class="form-group">
								<label>项目时间<span class="text-danger">*</span></label>	
								<input type="text" id="createTime" readonly="readonly" name="createTime" class="form-control" required="true" />
							</div>
						
							<div class="form-group">
								<label th:text="'会员'"></label><span class="text-danger">*</span>
								<select name="customerId" id="customerId" required="true" class="js-example-basic-single" style="width: 150px; height: 200px">
									<option th:value="-1" th:text="请选择会员"></option>
									<option th:each="customer : ${customerList}" th:value="${customer[0]}" th:text="${customer[1]}"></option>
								</select>
							</div>
						
							<div class="form-group">
								<label th:text="'项目名称'"></label><span class="text-danger">*</span>
								<select id="projectName" multiple="multiple" name="projectName" class="select form-control input-xs" style="width: 150px; height: 200px">
									<option th:value="-1" th:text="请选择项目"></option>
									<option th:each="product : ${productList}" th:value="${product[0]}" th:text="${product[1]}"></option>
								</select>
							</div>
							<div class="form-group">
								<table class="gridtable">
									<thead>
										<th>项目大类</th>
										<th>项名称</th>
										<th>次数</th>
										<th>金额</th>
										<th style="display:none;">productId</th>
										<th>操作</th>
									</thead>
									<tbody id="productTbody">
									</tbody>
									<tfoot>
										<tr>
											<td colspan="3">总金额:</td>
											<td colspan="4" id="totalAmount">0.00</td>
										</tr>
										<tr>
											<td colspan="3">最终总金额:</td>
											<td colspan="4"><input type="text" name="amount" id="amount" required="true" number="true" value="0"/></td>
										</tr>
									</tfoot>
								</table>
							</div>
							
							<!-- <div class="form-group">
								<label>项目金额<span class="text-danger">*</span></label>	
								<input name="amount" type="text" placeholder="项目金额" class="form-control" required="true" number="true" maxlength="11"/>
							</div> -->
							
							<div class="form-group">
								<label class="col-lg-2 control-label">备注</label>	
								<textarea name="remark" rows="3" cols="20" placeholder="备注" class="form-control"></textarea>
							</div>
						</div>
						
						<input type="hidden" name="productMsg" id="productMsg"/>
						
						<div class="modal-footer">
							<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
							<button type="button" id="submitEdit" class="btn btn-primary" >保存</button>
						</div>
					</form>
		</div>
		
		<script type="text/templete" id="btnGroup">
			<div class="btn-group" data-toggle="buttons">
				<button type="button" class="btn btn-link text-primary btn-edit" title="编辑" data-toggle="modal" data-target="#edit_dialog">编辑</button>
				<button type="button" class="btn btn-link text-danger btn-del" title="删除">删除</button>
			</div>
		</script>
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/addOrder.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>
